(ns client.UrlyBird
  "Contains the main class that will work with the jar to receive parameters from command line"
  (:gen-class)
  (:use client.interface
	server.server))

(defn -main
  "lets the program starts, either as a standalone client, network client or server"
 ([]
    (println "You need to tell parameters, either --server port, --client host port or --alone"))
 ([mode]
    (if (.equals mode "--alone")
      (client-start "alone")
      (println "You need to tell the correct parameters, either --server port, --client host port or --alone")))
 ([mode port]
    (if (.equals mode "--server")
      (server-start  (Integer/parseInt port))
      (println "You need to tell the correct parameters, ether --server port, --client host port or --alone")))
 ([mode host port]
    (if (.equals mode "--client")
      (client-start "net" host  (Integer/parseInt port))
      (println "You need to tell the correct parameters, ether --server port, --client host port or --alone"))))

       
